import request from '../utils/request';

export const fetchData = query => {
    return request({
        url: './table.json',
        method: 'get',
        params: query
    });
};

export const postValidUser = userName => {
    return request({
        url: '/isValidUser',
        method: 'post',
        data: {
            userName
        }
    })
}

export const postLogin = (userName, pass) => {
    return request({
        url: '/login',
        method: 'post',
        data: {
            userName,
            pass
        }
    })
}